﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using InfoJetSoft.Service.XPath.Exprs;

//CID 0766 //2011.01.23 //Begin
namespace InfoJetSoft.Service.XPath
{
    class BindingTestNodeList : List<XmlNode> , INodeList
    {
        public object Get(int index)
        {
            return this[index];
        }

        public void Append(object node)
        {
            if (node is XmlNode)
            {
                this.Add((XmlNode)node);
            }
            else
            {
                throw new Exception("Not supported data type: " + node);
            }
        }

        public bool HasNode(object node)
        {
            if (node is XmlNode)
            {
                return this.Contains((XmlNode)node);
            }
            else
            {
                throw new Exception("Not supported data type: " + node);
            }
        }
    }
}
//CID 0766 //2011.01.23 //End